package com.example.message.controller;

import com.example.message.handler.SysMessageJobsHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.UUID;

@RequestMapping("job")
@RestController
public class SysJobsController {

    @Resource
    private SysMessageJobsHandler sysMessageJobsHandler;

    @RequestMapping("add")
    public String add() throws Exception {
        String uuod = UUID.randomUUID().toString();
        sysMessageJobsHandler.send(uuod);
        return uuod;
    }
}
